#pragma once
#include "CBaseImage.h"

class CDicomImage : public CBaseImage
{
public:
	CDicomImage();
	virtual ~CDicomImage();

	mutable std::mutex m_mtx;
	mutable std::mutex m_parsermtx;
public:
	BOOL ParseFile(std::string fn);

	void GetDefaultWindow(double& wc, double& ww);
	void GetRange(double& minVal, double& maxVal);

	void* CreateThumbnail(int& width, int& height);

	BOOL CreateDIB(void*& pdib, int& w, int& h, int wc, int ww, int frame=0, bool bneg = false, bool bov = true);

	virtual int GetFrameCount();
	virtual void Close();
	virtual BOOL ReParseFile();
	virtual void GetTagList(std::vector<DcmTagInfo>& vec);

	void GetMeasureInfo(MeasureInfo& info, int type, std::vector<Gdiplus::PointF>* vecPts = NULL);
	bool Export(std::string dst, int format);


public:

	double GetLocation();
};

